<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-supplier-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">供应商编号：</label>
				<div class="col-sm-8">
					<input id="spNo" name="spNo" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">供应商名称：</label>
				<div class="col-sm-8">
					<input id="spName" name="spName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">供应商地址：</label>
				<div class="col-sm-8">
					<input id="spAddr" name="spAddr" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">供应商分类编号：</label>
				<div class="col-sm-8">
					<input id="spTypeNo" name="spTypeNo" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">供应商分类：</label>
				<div class="col-sm-8">
					<select id="spTypeNo" name="spTypeNo" class="form-control">
						<option value="">--选择供应商分类--</option>
						<option th:each="item:${supplierTypeList}" th:value="${item.id}" th:text="${item.typeName}"></option>
					</select>
					<input id="spTypeName" name="spTypeName" class="form-control" type="hidden">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8">
					<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
						<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}">
						<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
					</div>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/supplier"
		$("#form-supplier-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
	        }
	    }
	</script>
</body>
</html>
